/**
 * Stores the information of the products which are a Spirit or Liqueur
 * @author sdm21
 *
 */
public class Spirits extends Product{
	private static String type = "Spirit";
	private String spirit_variety;
	private String id;
	private String name;
	private double unit_price;
	private double case_price;
	private int quantity;
	private double abv;
	private String country_origin;
	
	/**
	 * Creates Spirits object
	 * @param id String of the product's unique code
	 * @param name String of the name of the product
	 * @param unit_price double of the cost per unit of the product
	 * @param case_price double of the cost per case of the product
	 * @param abv alcoholic content of the drink
	 * @param country_origin origin of the product
	 * @param spirit_variety the type of spirit it is, i.e Vodka, Rum etc
	 */
	public Spirits(String id, String name, double unit_price,
			double case_price, double abv, String country_origin, String spirit_variety, int quantity) {
		super(id, name, unit_price, case_price, type, abv, country_origin, 6, quantity);
		this.id = id;
		this.name = name;
		this.unit_price = unit_price;
		this.case_price = case_price;
		this.abv = abv;
		this.country_origin = country_origin;
		this.quantity = quantity;
		this.spirit_variety = spirit_variety;
	}

	/**
	 * returns the type of spirit the object is
	 * @return string of spirit variety
	 */
	public String getSpiritVariety(){
		return spirit_variety;
	}
	
	/** 
	 * changes the type of spirit the object iS
	 * @param spirit_variety string of the spirit variety
	 */
	public void setSpiritVariety(String spirit_variety){
		this.spirit_variety = spirit_variety;
	}
	
	/**
	 * Returns a String of the details of this product
	 */
	public String printDetails(){
		String details = String.format("%-6s", id);
		details += String.format("%-10s", type);
		details += String.format("%-20s", name);
		details += String.format("%-5s", abv);
		details += String.format("%-14s", country_origin);
		
		details += String.format("%-36s", spirit_variety);
		
		details += String.format("%-7s", unit_price);
		details += String.format("%-7s", case_price);
		details += String.format("%-17s",quantity);
		return details;
	}
}

